<template>
  <pageTabelLayout>
    <template #pageHeader>
      <div class="search-form divClass" v-if="headerShow">
        <div>
          <!--          permissionStore.hasPermisson('xjyc.cx')-->
          <a-form size="small" ref="formRef" :model="pageData" layout="inline" label-align="right">
            <a-form-item label="厂别">
              <a-cascader
                v-model="pageData.firm"
                :options="pageData.firmList"
                allow-clear
                class="bacClass"
                :style="{ width: '200px' }"
                popup-container="html"
              />
            </a-form-item>

            <a-form-item
              label="日期"
              field="date"
              :validate-trigger="['change', 'blur']"
              v-if="pageData.tableIndex == '1'"
            >
              <a-date-picker
                popup-container="html"
                :style="{ width: '200px' }"
                class="bacClass"
                v-model="pageData.queryStartDate"
                @press-enter="huiche"
              />
              至
              <a-date-picker
                popup-container="html"
                :style="{ width: '200px' }"
                class="bacClass"
                v-model="pageData.queryEndDate"
                @press-enter="huiche"
              />
            </a-form-item>
            <a-form-item label="机台">
              <a-input
                popup-container="html"
                :style="{ width: '200px' }"
                class="bacClass"
                v-model="pageData.machineCode"
                @press-enter="huiche"
              />
            </a-form-item>
            <a-form-item
              label="调机单号"
              v-if="pageData.tableIndex === '3' || pageData.tableIndex === '4'"
            >
              <a-input
                popup-container="html"
                :style="{ width: '200px' }"
                class="bacClass"
                v-model="pageData.adjustmentCode"
                @press-enter="huiche"
              />
            </a-form-item>
            <a-form-item
              label="洗机预警天数"
              field="warningDays"
              :validate-trigger="['change', 'blur']"
              v-if="pageData.tableIndex === '2' && permissionStore.hasPermisson('xjycwcl.xjyjts')"
            >
              <a-input-number
                popup-container="html"
                :min="0"
                :precision="0"
                :style="{ width: '200px' }"
                class="bacClass"
                v-model="pageData.warningDays"
                @press-enter="huiche"
              />
            </a-form-item>
          </a-form>
        </div>
      </div>
      <div class="my-divisders">
        <a-divider orientation="center">
          <icon-double-up
            v-if="headerShow"
            @click="headerShow = false"
            :strokeWidth="2"
            :size="18"
          />
          <icon-double-down v-else @click="headerShow = true" :strokeWidth="2" :size="18" />
        </a-divider>
      </div>
      <div class="my-tool-bar">
        <Toolbar
          :items="pageData.btnList"
          @select="selectHandler"
          @export="handleExport"
          @addTj="addTj"
        >
        </Toolbar>
      </div>
    </template>
    <template #pageTabel>
      <a-tabs
        :lazy-load="true"
        :justify="true"
        @change="changeTabs"
        :default-active-key="pageData.tableIndex"
      >
        <a-tab-pane title="洗机监控" key="1">
          <a-spin
            :loading="pageData.pageLoading"
            tip="加载中"
            dot
            style="height: 100%; width: 100%; z-index: 999"
          >
            <div style="width: 100%; height: 100%">
              <encapsulation-agrid
                ref="table1Ref"
                :configaggrid="configTable1"
              ></encapsulation-agrid>
            </div>
          </a-spin>
        </a-tab-pane>
        <a-tab-pane title="洗机预测未处理" key="2">
          <a-spin
            :loading="pageData.pageLoading"
            tip="加载中"
            dot
            style="height: 100%; width: 100%; z-index: 999"
          >
            <div style="width: 100%; height: 100%">
              <encapsulation-agrid
                ref="table2Ref"
                :configaggrid="configTable2"
              ></encapsulation-agrid>
            </div>
          </a-spin>
        </a-tab-pane>
        <a-tab-pane title="洗机预测已处理" key="3">
          <a-spin
            :loading="pageData.pageLoading"
            tip="加载中"
            dot
            style="height: 100%; width: 100%; z-index: 999"
          >
            <div style="width: 100%; height: 100%">
              <encapsulation-agrid
                ref="table3Ref"
                :configaggrid="configTable3"
              ></encapsulation-agrid>
            </div>
          </a-spin>
        </a-tab-pane>
        <a-tab-pane title="洗机记录" key="4">
          <a-spin
            :loading="pageData.pageLoading"
            tip="加载中"
            dot
            style="height: 100%; width: 100%; z-index: 999"
          >
            <div style="width: 100%; height: 100%">
              <encapsulation-agrid
                ref="table4Ref"
                :configaggrid="configTable4"
              ></encapsulation-agrid>
            </div>
          </a-spin>
        </a-tab-pane>
      </a-tabs>
    </template>
    <a-modal
      v-model:visible="modalData.visible"
      title=""
      :draggable="true"
      width="1300px"
      style="z-index: 999"
      @close="handleModalClose"
    >
      <a-form
        size="mini"
        :model="modalData.adjustment"
        layout="inline"
        label-align="right"
        ref="formRef1"
      >
        <a-form-item
          label="机台号"
          :style="{ width: '300px' }"
          :rules="[{ required: true, message: '机台号必填' }]"
          :validate-trigger="['blur']"
          field="machineCode"
          label-col-flex="90px"
        >
          <a-select
            popup-container="html"
            :loading="loading"
            class="bacClass"
            v-model="modalData.adjustment['machineCode']"
            :filter-option="false"
            disabled
            allow-search
            allow-clear
            @search="searchMachine"
            @change="changeMachine"
          >
            <a-option v-for="item in modalData.machineList" :value="item['machineCode']"
              >{{ item['machineCode'] }}——{{ item['machineName'] }}
            </a-option>
          </a-select>
        </a-form-item>
        <a-form-item
          label="调机开始时间"
          :style="{ width: '270px' }"
          :rules="[{ required: true, message: '调机开始时间必填' }]"
          :validate-trigger="['blur']"
          field="startTime"
          label-col-flex="110px"
        >
          <a-date-picker
            popup-container="html"
            v-model="modalData.adjustment['startTime']"
            format="YYYY-MM-DD HH:mm:ss"
            show-time
            class="bacClass timeClass"
          />
        </a-form-item>

        <a-form-item label="调机结束时间" :style="{ width: '270px' }" label-col-flex="90px">
          <a-date-picker
            popup-container="html"
            v-model="modalData.adjustment['endTime']"
            format="YYYY-MM-DD HH:mm:ss"
            show-time
            class="bacClass timeClass"
          />
        </a-form-item>

        <a-form-item label="是否抽针" :style="{ width: '260px' }" label-col-flex="90px">
          <a-select
            popup-container="html"
            class="bacClass"
            v-model="modalData.adjustment['drawnNeedleState']"
            :allow-clear="true"
            disabled
          >
            <a-option :value="0">抽针</a-option>
            <a-option :value="1">圆筒</a-option>
          </a-select>
        </a-form-item>

        <a-form-item label="织布单号" :style="{ width: '300px' }" label-col-flex="90px">
          <a-input v-model="modalData.adjustment['planOrderCode']" disabled class="bacClass" />
        </a-form-item>

        <a-form-item label="生产单号" :style="{ width: '270px' }" label-col-flex="90px">
          <a-select
            popup-container="html"
            :style="{ width: '210px' }"
            :loading="loading"
            class="bacClass"
            v-model="modalData.adjustment['weaveCode']"
            :filter-option="false"
            allow-clear
            @change="handleWeaveCodeChange"
          >
            <a-option v-for="item in modalData.adjustment.weaveCodeList" :value="item['weaveCode']"
              >{{ item['weaveCode'] }}
            </a-option>
          </a-select>
        </a-form-item>

        <a-form-item label="楼层" :style="{ width: '270px' }" label-col-flex="90px">
          <a-input v-model="modalData.adjustment['storey']" disabled class="bacClass" />
        </a-form-item>

        <a-form-item label="取样员" :style="{ width: '260px' }" label-col-flex="90px">
          <a-input
            v-model="modalData.adjustment['sampleStaff']"
            readonly
            @click="cxTable(0)"
            placeholder="点击选员工"
            class="bacClass"
          />
        </a-form-item>

        <a-form-item label="客户名称" :style="{ width: '300px' }" label-col-flex="90px">
          <a-input v-model="modalData.adjustment['customName']" disabled class="bacClass" />
        </a-form-item>

        <a-form-item label="坯布编号" :style="{ width: '270px' }" label-col-flex="90px">
          <a-input v-model="modalData.adjustment['greyCode']" disabled class="bacClass" />
        </a-form-item>

        <a-form-item label="坯布名称" :style="{ width: '270px' }" label-col-flex="90px">
          <a-input
            v-model="modalData.adjustment['grayName']"
            disabled
            :title="modalData.adjustment['grayName']"
            class="bacClass"
          />
        </a-form-item>

        <a-form-item label="调机布重量" :style="{ width: '260px' }" label-col-flex="90px">
          <a-input-number
            v-model="modalData.adjustment['adjustmentWeight']"
            class="input-demo bacClass"
            :min="0"
            :max="1000000000000000"
          />
        </a-form-item>

        <a-form-item label="取样布重量" :style="{ width: '300px' }" label-col-flex="90px">
          <a-input-number
            v-model="modalData.adjustment['sampleWeight']"
            class="input-demo bacClass"
            :min="0"
            :max="10000000000000000"
          />
        </a-form-item>

        <a-form-item label="是否开幅" :style="{ width: '270px' }" label-col-flex="90px">
          <a-select
            popup-container="html"
            class="bacClass"
            v-model="modalData.adjustment['widthState']"
            :allow-clear="true"
            disabled
          >
            <a-option :value="0">开幅</a-option>
            <a-option :value="1">不开幅</a-option>
          </a-select>
        </a-form-item>

        <a-form-item label="折扣比例(%)" :style="{ width: '270px' }" label-col-flex="90px">
          <a-input-number
            v-model="modalData.adjustment['adjustmentRatio']"
            class="input-demo bacClass"
            :min="0"
            :max="100"
          />
        </a-form-item>
        <a-form-item
          label="调机类型"
          :style="{ width: '260px' }"
          :rules="[{ required: true, message: '调机类型必填' }]"
          :validate-trigger="['blur']"
          field="maintainType"
          label-col-flex="90px"
        >
          <a-select
            popup-container="html"
            class="bacClass"
            v-model="modalData.adjustment['maintainType']"
            :allow-clear="true"
            @change="changeJx"
          >
            <a-option
              v-for="item in modalData.adjustment.maintainTypeList"
              :value="item['machineTypeName']"
            >
              {{ item['machineTypeName'] }}
            </a-option>
          </a-select>
        </a-form-item>
        <a-form-item
          label="最后调机类型"
          :style="{ width: '300px' }"
          field="lastTimeMaintainType"
          label-col-flex="90px"
        >
          <a-input
            v-model="modalData.adjustment['lastTimeMaintainType']"
            disabled
            class="bacClass"
          />
        </a-form-item>
        <a-form-item
          label="机台设备Id"
          :style="{ width: '270px' }"
          field="machineId"
          label-col-flex="90px"
        >
          <a-input v-model="modalData.adjustment['machineId']" disabled class="bacClass" />
        </a-form-item>
      </a-form>
      <div style="width: 100%; border: 1px solid #ccc; height: 400px; overflow: auto">
        <div
          style="display: inline-block; width: 49%; height: 100%; vertical-align: top; padding: 5px"
        >
          <!--          <div>-->
          <!--            <a-button type="primary" @click="cxTable(1)" size="mini">选择派工人员-->
          <!--            </a-button>-->
          <!--          </div>-->

          <div style="width: 100%; height: 35%; overflow: auto">
            <table class="Table" style="margin: 0px auto">
              <thead>
                <tr>
                  <td class="thClass">操作</td>
                  <td class="thClass">员工名称</td>
                  <td class="thClass">分配</td>
                  <td class="thClass">分配金额</td>
                </tr>
              </thead>
              <tbody>
                <tr v-for="(item, index) in modalData.checkRyList" :key="index">
                  <td style="font-size: 20px; cursor: pointer">
                    <icon-delete @click="delRow(item['id'])" />
                  </td>
                  <td>{{ item['employeeName'] }}</td>
                  <td>
                    <a-input-number
                      v-model="item['ratio']"
                      style="height: 30px; width: 80px"
                      class="input-demo bacClass"
                      :min="0"
                      :max="100"
                      @change="changeRatio(item)"
                    />
                  </td>
                  <td>{{ item['allocationAmount'].toFixed(2) }}</td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
        <div style="display: inline-block; width: 50%">
          <table class="Table" style="margin: 0 auto; margin-top: 30px">
            <thead>
              <tr>
                <td class="thClass">调机项目</td>
                <td class="thClass">标准</td>
                <td class="thClass">调整</td>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>布架宽度</td>
                <td>{{ itemsoB1['clothRackWidth'] }}</td>
                <td>
                  <a-input class="bacClass" v-model="itemsoB['clothRackWidth']" />
                </td>
              </tr>
              <tr>
                <td>织针型号</td>
                <td>{{ itemsoB1['needleModel'] }}</td>
                <td>
                  <a-select
                    popup-container="html"
                    class="bacClass"
                    :style="{ width: '210px' }"
                    :loading="needloading"
                    @search="needhandleSearch"
                    v-model="itemsoB['needleModel']"
                    :filter-option="false"
                    allow-search
                    allow-clear
                    @focus="needfocusSel"
                  >
                    <a-option v-for="item in modalData.nameList" :value="item.specName"
                      >{{ item.specName }}
                    </a-option>
                  </a-select>
                </td>
              </tr>
              <tr>
                <td>织针1段</td>
                <td>{{ itemsoB1['needleOnePerod'] == 1 ? '√' : '' }}</td>
                <td>
                  <a-select
                    popup-container="html"
                    v-model="itemsoB['needleOnePerod']"
                    class="bacClass"
                    allow-clear
                    :disabled="modalData.isXq"
                  >
                    <a-option :value="0"></a-option>
                    <a-option :value="1">√</a-option>
                  </a-select>
                </td>
              </tr>
              <tr>
                <td>织针2段</td>
                <td>{{ itemsoB1['needleTwoPerod'] == 1 ? '√' : '' }}</td>
                <td>
                  <a-select
                    popup-container="html"
                    v-model="itemsoB['needleTwoPerod']"
                    class="bacClass"
                    allow-clear
                    :disabled="modalData.isXq"
                  >
                    <a-option :value="0"></a-option>
                    <a-option :value="1">√</a-option>
                  </a-select>
                </td>
              </tr>
              <tr>
                <td>织针3段</td>
                <td>{{ itemsoB1['needleThreePerod'] == 1 ? '√' : '' }}</td>
                <td>
                  <a-select
                    popup-container="html"
                    v-model="itemsoB['needleThreePerod']"
                    class="bacClass"
                    allow-clear
                    :disabled="modalData.isXq"
                  >
                    <a-option :value="0"></a-option>
                    <a-option :value="1">√</a-option>
                  </a-select>
                </td>
              </tr>
              <tr>
                <td>织针4段</td>
                <td>{{ itemsoB1['needleFourPerod'] == 1 ? '√' : '' }}</td>
                <td>
                  <a-select
                    popup-container="html"
                    v-model="itemsoB['needleFourPerod']"
                    class="bacClass"
                    allow-clear
                    :disabled="modalData.isXq"
                  >
                    <a-option :value="0"></a-option>
                    <a-option :value="1">√</a-option>
                  </a-select>
                </td>
              </tr>
              <tr>
                <td>争食</td>
                <td>{{ itemsoB1['dodge'] == 1 ? '√' : '' }}</td>
                <td>
                  <a-select
                    popup-container="html"
                    v-model="itemsoB['dodge']"
                    class="bacClass"
                    allow-clear
                    :disabled="modalData.isXq"
                  >
                    <a-option :value="0"></a-option>
                    <a-option :value="1">√</a-option>
                  </a-select>
                </td>
              </tr>
              <tr>
                <td>分食</td>
                <td>{{ itemsoB1['broken'] == 1 ? '√' : '' }}</td>
                <td>
                  <a-select
                    popup-container="html"
                    v-model="itemsoB['broken']"
                    class="bacClass"
                    allow-clear
                    :disabled="modalData.isXq"
                  >
                    <a-option :value="0"></a-option>
                    <a-option :value="1">√</a-option>
                  </a-select>
                </td>
              </tr>
              <tr>
                <td>不争不分</td>
                <td>{{ itemsoB1['allTrue'] == 1 ? '√' : '' }}</td>
                <td>
                  <a-select
                    popup-container="html"
                    v-model="itemsoB['allTrue']"
                    class="bacClass"
                    allow-clear
                    :disabled="modalData.isXq"
                  >
                    <a-option :value="0"></a-option>
                    <a-option :value="1">√</a-option>
                  </a-select>
                </td>
              </tr>
              <tr>
                <td>布加张力A-D</td>
                <td>{{ itemsoB1['clothTensionAD'] }}</td>
                <td>
                  <a-select
                    popup-container="html"
                    v-model="itemsoB['clothTensionAD']"
                    class="bacClass"
                    allow-clear
                    :disabled="modalData.isXq"
                  >
                    <a-option value="A">A</a-option>
                    <a-option value="B">B</a-option>
                    <a-option value="C">C</a-option>
                    <a-option value="D">D</a-option>
                  </a-select>
                </td>
              </tr>
              <tr>
                <td>布加张力1-16</td>
                <td>{{ itemsoB1['clothTensionOS'] }}</td>
                <td>
                  <a-select
                    popup-container="html"
                    v-model="itemsoB['clothTensionOS']"
                    class="bacClass"
                    allow-clear
                    :disabled="modalData.isXq"
                  >
                    <a-option :value="1">1</a-option>
                    <a-option :value="2">2</a-option>
                    <a-option :value="3">3</a-option>
                    <a-option :value="4">4</a-option>
                    <a-option :value="5">5</a-option>
                    <a-option :value="6">6</a-option>
                    <a-option :value="7">7</a-option>
                    <a-option :value="8">8</a-option>
                    <a-option :value="9">9</a-option>
                    <a-option :value="10">10</a-option>
                    <a-option :value="11">11</a-option>
                    <a-option :value="12">12</a-option>
                    <a-option :value="13">13</a-option>
                    <a-option :value="14">14</a-option>
                    <a-option :value="15">15</a-option>
                    <a-option :value="16">16</a-option>
                  </a-select>
                </td>
              </tr>
              <tr>
                <td>底座垫片</td>
                <td>{{ itemsoB1['baseGasket'] }}</td>
                <td>
                  <a-input
                    class="bacClass"
                    v-model="itemsoB['baseGasket']"
                    :disabled="modalData.isXq"
                  />
                </td>
              </tr>
              <tr>
                <td>送纱盘-中盘</td>
                <td>{{ itemsoB1['sandTrayMiddlePlate'] }}</td>
                <td>
                  <a-input-number
                    class="bacClass"
                    v-model="itemsoB['sandTrayMiddlePlate']"
                    :disabled="modalData.isXq"
                  />
                </td>
              </tr>
              <tr>
                <td>送纱盘-面盘</td>
                <td>{{ itemsoB1['sandTableSurfacePlate'] }}</td>
                <td>
                  <a-input-number
                    class="bacClass"
                    v-model="itemsoB['sandTableSurfacePlate']"
                    :disabled="modalData.isXq"
                  />
                </td>
              </tr>
              <tr>
                <td>送沙盘-底盘</td>
                <td>{{ itemsoB1['sandDownSurfacePlate'] }}</td>
                <td>
                  <a-input-number
                    class="bacClass"
                    v-model="itemsoB['sandDownSurfacePlate']"
                    :disabled="modalData.isXq"
                  />
                </td>
              </tr>
              <tr>
                <td>齿轮</td>
                <td>{{ itemsoB1['gear'] }}</td>
                <td>
                  <a-input class="bacClass" v-model="itemsoB['gear']" :disabled="modalData.isXq" />
                </td>
              </tr>
              <tr>
                <td>机速</td>
                <td>{{ itemsoB1['engineSpeed'] }}</td>
                <td>
                  <a-input-number
                    v-model="itemsoB['engineSpeed']"
                    placeholder=""
                    class="bacClass"
                    :min="0"
                    :disabled="modalData.isXq"
                    :max="1000000000000"
                    :precision="2"
                  />
                </td>
              </tr>
              <tr>
                <td>油速</td>
                <td>{{ itemsoB1['oilVelocity'] }}</td>
                <td>
                  <a-input-number
                    v-model="itemsoB['oilVelocity']"
                    placeholder=""
                    class="bacClass"
                    :min="0"
                    :disabled="modalData.isXq"
                    :max="1000000000000"
                    :precision="2"
                  />
                </td>
              </tr>
              <tr>
                <td>实开路数</td>
                <td>{{ itemsoB1['actualOpenWay'] }}</td>
                <td>
                  <a-input
                    v-model="itemsoB['actualOpenWay']"
                    placeholder=""
                    class="bacClass"
                    :disabled="modalData.isXq"
                  />
                </td>
              </tr>
              <tr>
                <td>针叶型号</td>
                <td>{{ itemsoB1['needleModelNo'] }}</td>
                <td>
                  <a-select
                    popup-container="html"
                    class="bacClass"
                    v-model="itemsoB['needleModelNo']"
                    @click="needleMpdelClick('')"
                    @search="needleMpdelClick"
                    allow-clear
                    allow-search
                  >
                    <a-option v-for="item in needleMpdelList" :value="item.specName">
                      {{ item.specName }}
                    </a-option>
                  </a-select>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>

      <template #footer>
        <a-button type="primary" @click="handleBeforeOk" size="mini" :loading="modalData.btnLoading">保存 </a-button>
        <a-button size="mini" @click="handleCancel">关闭</a-button>
      </template>
    </a-modal>
    <!--    指派调机员弹窗-->
    <a-modal
      v-model:visible="visible1"
      title="指派调机人"
      @cancel="handleCancel1"
      style="z-index: 1000"
      :draggable="true"
      @ok="handleOk"
    >
      <a-form :model="pageData" :label-col-props="{ span: 6 }" :wrapper-col-props="{ span: 18 }">
        <a-form-item field="ygName" label="员工">
          <a-select
            popup-container="html"
            class="bacClass"
            v-model="modalData.ygName"
            @focus="getYgName"
            :loading="loading6"
            @search="handleSearch6"
            :filter-option="false"
            allow-search
            allow-clear
          >
            <a-option
              v-for="(item, index) in modalData.ygNameList"
              :key="index"
              :value="item['id']"
            >
              {{ item['name'] }}
            </a-option>
          </a-select>
        </a-form-item>
      </a-form>
    </a-modal>
    <!--    详情弹窗-->
    <a-modal
      v-model:visible="visible2"
      title="详情"
      @cancel="handleCancel2"
      style="z-index: 1000"
      :draggable="true"
      fullscreen
    >
      <div style="width: 100%; height: calc(100vh - 135px)">
        <encapsulation-agrid ref="table5Ref" :configaggrid="configTable5"></encapsulation-agrid>
      </div>
      <template #footer>
        <a-button size="mini" @click="handleCancel2">关闭</a-button>
      </template>
    </a-modal>
  </pageTabelLayout>
</template>

<script setup lang="ts">
  import { ref, reactive, nextTick, onMounted, watch } from 'vue'
  import PageTabelLayout from '@/components/pageTabelLayout.vue'
  import Toolbar from '@/components/Toolbar.vue'
  import usePermission from '@/store/modules/permission'
  import emitter from '@/hooks/useEventBus'
  import tableColumns from '@/views/WashingMachinePrediction/tableConfig/tableColumns'
  import tableColumns2 from '@/views/WashingMachinePrediction/tableConfig/tableColumns2'
  import tableColumns3 from '@/views/WashingMachinePrediction/tableConfig/tableColumns3'
  import tableColumns4 from '@/views/WashingMachinePrediction/tableConfig/tableColumns4'
  import tableColumns5 from '@/views/WashingMachinePrediction/tableConfig/tableColumns5'
  import { get, post } from '@/api/http'
  import { Message } from '@arco-design/web-vue'
  import { ElMessage } from 'element-plus'
  import { data } from 'autoprefixer'
  import dayjs from 'dayjs'

  const adjustment = reactive({
    adjustmentCode: '', //调机单号
    machineCode: '', //机台号
    machineList: [], //机台号列表
    startTime: '', //调机开始时间
    endTime: '', //调机结束时间
    drawnNeedleState: '', //是否抽针
    planOrderCode: '', //织布单号
    weaveCode: '', //生产单号
    weaveCodeList: [], //生产单号列表
    storey: '', //楼层
    sampleStaff: '', //取样员
    customName: '', //客户名称
    greyCode: '', //坯布编号
    grayName: '', //坯布名称
    adjustmentWeight: '', //调机布重量
    sampleWeight: '', //取样布重量
    widthState: '', //是否开幅
    adjustmentRatio: '', //折扣比例
    maintainType: '', //调机类型
    discountPrice: '', //折扣单价
    maintainTypeList: [], //调机类型列表
    lastTimeMaintainTypeList: [], //最后调机类型列表
    machineId: '', //机台设备Id
  })
  const modalData: any = reactive({
    visible: false,
    adjustment: adjustment,
    machineList: [],
    checkRyList: [],
    nameList: [],
    dropDownList: [],
    ygName: '',
    ygNameList: [],
    firmId: '',
    applyBranchId: '',
    ygType: '',
    btnLoading:false,
  })
  const loading = ref(false)
  const loading6 = ref(false)
  const needloading = ref(false)
  const needoptions = ref<any>(modalData.nameList)
  const options = ref<any>(modalData.dropDownList)
  //下拉框查询  织针型号
  const needselCxAll = async (val: any) => {
    const res = await post({
      url: 'purchase/MaterialSpec/getFieldValue',
      data: val,
    })
    try {
      if (res.code === 200) {
        modalData.nameList = data
      } else {
        Message.error({
          content: '查询失败！',
          duration: 5000,
        })
      }
    } catch (e) {
      console.log(e)
    }
  }
  const needhandleSearch = (value: any) => {
    if (value) {
      const ob = { specName: value }
      loading.value = true
      needselCxAll(ob)
      needoptions.value = modalData.nameList
      needloading.value = false
    } else {
      options.value = []
    }
  }
  const headerShow = ref(true)
  const pageData = reactive({
    tableIndex: '1',
    btnList: [],
    pageLoading: false,
    firm: '', //厂别
    firmList: [], //厂别列表
    queryStartDate: dayjs(Date.now()).format('YYYY-MM-DD'), //开始日期
    queryEndDate: dayjs(Date.now()).add(6, 'days').format('YYYY-MM-DD'), //结束日期
    machineCode: '', //机台号
    warningDays: 3, //预警天数
    adjustmentCode: '', //调机单号
    currentExport: '', //当前导出,随着页签变化
  })
  let itemsoB = reactive({
    id: '',
    greyCloth: '',
    nameCloth: '',
    machineType: '',
    machineID: '',
    cylinderCoding: '',
    clothRackWidth: '',
    needleModel: '',
    needleOnePerod: 0,
    needleTwoPerod: 0,
    needleThreePerod: 0,
    needleFourPerod: 0,
    dodge: 0,
    broken: 0,
    allTrue: 0,
    clothTensionAD: '',
    clothTensionOS: 1,
    baseGasket: '',
    sandTrayMiddlePlate: 0,
    sandTableSurfacePlate: 0,
    gear: '',
    needleGrade: '',
    engineSpeed: 0,
    oilVelocity: 0,
  })
  let itemsoB1 = reactive({
    id: '',
    greyCloth: '',
    nameCloth: '',
    machineType: '',
    machineID: '',
    cylinderCoding: '',
    clothRackWidth: '',
    needleModel: '',
    needleOnePerod: 0,
    needleTwoPerod: 0,
    needleThreePerod: 0,
    needleFourPerod: 0,
    dodge: 0,
    broken: 0,
    allTrue: 0,
    clothTensionAD: '',
    clothTensionOS: 1,
    baseGasket: '',
    sandTrayMiddlePlate: 0,
    sandTableSurfacePlate: 0,
    gear: '',
    needleGrade: '',
    engineSpeed: 0,
    oilVelocity: 0,
  })
  const handleModalClose = () => {
    modalData.visible = false
    for (let key in modalData.adjustment) {
      modalData.adjustment[key] = ''
    }
    modalData.checkRyList = []
  }
  //设置权限
  // ['查询', '新增', '删除', '导出', '导入']
  const permissionStore = usePermission()

  if (permissionStore.hasPermisson('xjjk.cx')) {
    pageData.btnList.push('查询')
  }
  if (permissionStore.hasPermisson('xjjk.dc')) {
    pageData.btnList.push('导出')
  }
  // 获取公司下拉框
  const getAllFirms = async () => {
    try {
      const res = await post({
        url: 'org/baCompany/getTreeCompanyByUser',
        data: {},
      })
      if (res.code === 200) {
        pageData.firmList = res.data
      } else {
        Message.error(res.message)
      }
    } catch (e) {
      console.log(e)
    }
  }
  onMounted(() => {
    getAllFirms()
    searchMachine('')
    table1Ref.value.setQuery({
      queryStartDate: pageData.queryStartDate,
      queryEndDate: pageData.queryEndDate,
      machineCode: pageData.machineCode,
    })
  })
  // ------------------------------------新增调机单相关------------------------------------
  //预防保存的时候没有公司id和公司名称 如果没有 从机台号下拉接口这边去取
  let firmData = {}
  let tempSearchData: any = []
  //机台号搜索
  //status为true时 代表新增调机单 机台号直接搜索勾选行的机台号 不然后面赋值会出现匹配不上的问题
  const searchMachine = async (val: any, status?: any, isShowStorey = false) => {
    const res = await get({
      url: '/planSingle/adjustment/getMachineByAdjustment',
      data: {
        machineCode: status ? table2Ref.value.getSelectedRows()[0].machineCode : val,
      },
    })
    try {
      if (res.code == 200) {
        tempSearchData = res.data
        modalData.machineList = res.data
        if (isShowStorey) modalData.adjustment['storey'] = res.data[0].areaName
        firmData['firmId'] = res.data[0].firmId
        firmData['firm'] = res.data[0].firm
        if (status) {
          const storey = tempSearchData.find((item: any) => item.machineCode == val)['areaName']
          if (storey) modalData.adjustment['storey'] = storey
          modalData.adjustment.machineCode = table2Ref.value.getSelectedRows()[0].machineCode
          getInfoByMachineCode(table2Ref.value.getSelectedRows()[0].machineCode)
          modalData.adjustment.machineId = res.data[0].machineId
        }
      } else {
        ElMessage.error(res.message)
      }
    } catch (e) {
      console.log(e)
    }
  }
  const getInfoByMachineCode = async (machineCode: any) => {
    try {
      const res = await get({
        url: `/planSingle/adjustment/getPlanOrderByMachineCode?machineCode=${machineCode}`,
      })
      if (res.code === 200) {
        var resultAdjustment = res.data.adjustment
        //删除调不需要的字段
        delete resultAdjustment['storey']
        delete resultAdjustment['maintainType']
        // delete resultAdjustment['weaveCode']
        for (const key in resultAdjustment) {
          if (key === 'adjustmentRatio') {
            resultAdjustment[key] = parseFloat(resultAdjustment[key])
          }
          if (key === 'adjustmentWeight' && resultAdjustment[key] === null) {
            resultAdjustment[key] = 0
          }
          if (key === 'sampleWeight' && resultAdjustment[key] === null) {
            resultAdjustment[key] = 0
          }
          if (key !== 'machineId') modalData.adjustment[key] = resultAdjustment[key]
        }
        //派工 员工
        if (res.data['userList'].length > 0) {
          modalData.checkRyList = res.data['userList']
          modalData.checkRyList.forEach(function (o: any) {
            o['allocationAmount'] = 0
          })
        }
        //调机项目
        if (res.data['adjustmentStandard'] != null && res.data['adjustmentStandard'] != '') {
          if (Object.keys(res.data['adjustmentStandard']).length > 0) {
            for (let key in res.data['adjustmentStandard']) {
              itemsoB[key] = res.data['adjustmentStandard'][key]
            }
          }
        }
      } else {
        Message.error({
          content: res.message,
          duration: 5000,
        })
        reSetAdjustment()
        reSetItemsoB()
      }
      const res1 = await get({
        url: `planSingle/adjustment/getWeaveCodeInfoByMachineCode?machineCode=${machineCode}`,
      })
      if (res1.code == 200) {
        modalData.adjustment.weaveCodeList = res1.data
      } else {
        ElMessage.error(res1.message)
      }
    } catch (e) {
      console.log(e)
    }
  }
  watch(
    () => modalData.adjustment.weaveCodeList,
    (newVal) => {
      console.log('newVal', newVal)
    }
  )
  const changeMachine = (val: any) => {
    modalData.checkRyList = []
    modalData.adjustment['weaveCode'] = ''
    modalData.adjustment.weaveCodeList = []
    if (val != '') {
      searchMachine(val, false, false)
      if (tempSearchData.length == 1)
        modalData.adjustment['machineId'] = tempSearchData[0].machineId
      getInfoByMachineCode(val)
    } else {
      searchMachine('')
      reSetAdjustment()
      reSetItemsoB()
    }
  }
  //调机类型下拉框
  const getMaintainTypeList = async () => {
    const res = await post({
      url: 'pieceData/adjustingMachinePrice/getList',
      data: {
        deletestate: 0,
      },
    })
    if (res.code === 200) {
      modalData.adjustment.lastTimeMaintainTypeList = res.data
      modalData.adjustment.maintainTypeList = res.data
    } else {
      Message.error({
        content: res.message,
        duration: 5000,
      })
    }
  }
  const reSetAdjustment = () => {
    modalData.adjustment.id = null
    modalData.adjustment.adjustmentCode = ''
    modalData.adjustment.machineCode = ''
    modalData.adjustment.startTime = ''
    modalData.adjustment.endTime = ''
    modalData.adjustment.adjustmentRatio = 100
    modalData.adjustment.sampleStaffId = 0
    modalData.adjustment.weaveCode = ''
    modalData.adjustment.planOrderCode = ''
    modalData.adjustment.greyCode = ''
    modalData.adjustment.grayName = ''
    modalData.adjustment.monitor = ''
    modalData.adjustment.monitorState = 0
    modalData.adjustment.drawnNeedleState = ''
    modalData.adjustment.widthState = ''
    modalData.adjustment.customName = ''
    modalData.adjustment.sampleWeight = 0
    modalData.adjustment.sampleStaff = ''
    modalData.adjustment.adjustmentWeight = 0
    modalData.adjustment.storey = ''
    modalData.adjustment.accomplishState = 0
    modalData.adjustment.lastTimeMaintainCode = ''
    modalData.adjustment.lastTimeMaintainType = ''
    modalData.adjustment.lastTimeMaintainDate = ''
    modalData.adjustment.adjustmentState = 0
    modalData.adjustment.obsoleteState = 0
    modalData.adjustment.deleteState = 0
    modalData.adjustment.remark = ''
    modalData.adjustment.createName = ''
    modalData.adjustment.createTime = ''
    modalData.adjustment.updateName = ''
    modalData.adjustment.updateTime = ''
    modalData.adjustment.discountPrice = 0
    modalData.adjustment.machineId = ''
  }
  const reSetItemsoB = () => {
    itemsoB.id = ''
    itemsoB.greyCloth = ''
    itemsoB.nameCloth = ''
    itemsoB.machineType = ''
    itemsoB.machineID = ''
    itemsoB.cylinderCoding = ''
    itemsoB.clothRackWidth = ''
    itemsoB.needleModel = ''
    itemsoB.needleOnePerod = 0
    itemsoB.needleTwoPerod = 0
    itemsoB.needleThreePerod = 0
    itemsoB.needleFourPerod = 0
    itemsoB.dodge = 0
    itemsoB.broken = 0
    itemsoB.allTrue = 0
    itemsoB.clothTensionAD = ''
    itemsoB.clothTensionOS = 0
    itemsoB.baseGasket = ''
    itemsoB.sandTrayMiddlePlate = 0
    itemsoB.sandTableSurfacePlate = 0
    itemsoB.gear = ''
    itemsoB.needleGrade = ''
    itemsoB.engineSpeed = 0
    itemsoB.oilVelocity = 0
  }
  const handleWeaveCodeChange = (e: any) => {
    if (e !== '') {
      const storey = modalData.adjustment['storey']
      const maintainType = modalData.adjustment['maintainType']
      const tempMaintainTypeList = modalData.adjustment.maintainTypeList
      const tempWeaveCodeList = modalData.adjustment.weaveCodeList
      const tempMachineId = modalData.adjustment.machineId
      const filterObj = modalData.adjustment.weaveCodeList.find((item: any) => item.weaveCode == e)
      if (!filterObj['adjustmentWeight']) filterObj['adjustmentWeight'] = 0
      if (!filterObj['sampleWeight']) filterObj['sampleWeight'] = 0
      modalData.adjustment = JSON.parse(JSON.stringify(filterObj))
      modalData.adjustment['storey'] = storey
      modalData.adjustment['maintainType'] = maintainType
      modalData.adjustment.weaveCodeList = tempWeaveCodeList
      modalData.adjustment.machineId = tempMachineId
      modalData.adjustment.maintainTypeList = tempMaintainTypeList
    } else {
      modalData.adjustment['drawnNeedleState'] = '' //清空是否抽针
      modalData.adjustment['planOrderCode'] = '' //清空织布单号
      modalData.adjustment['customName'] = '' //清空客户名称
      modalData.adjustment['greyCode'] = '' //清空坯布编号
      modalData.adjustment['grayName'] = '' //清空坯布名称
      modalData.adjustment['widthState'] = '' //清空是否开幅
    }
  }
  //弹出员工框
  const visible1 = ref(false)
  const handleCancel1 = () => {
    visible1.value = false
  }
  let isType: any = null
  //选择人员的确定按钮
  const handleOk = () => {
    // 员工类型
    var nameList = modalData.ygNameList.filter(function (o: any) {
      return modalData.ygName == o['id']
    })
    if (isType == 0) {
      modalData.adjustment['sampleStaffId'] = modalData.ygName
      modalData.adjustment['sampleStaff'] = nameList[0]['name']
    } else {
      var ob = {}
      //员工类型
      ob['idType'] = modalData.ygType
      //员工名称
      ob['employeeId'] = modalData.ygName
      ob['employeeName'] = nameList[0]['name']
      ob['employeeCode'] = nameList[0]['code']
      ob['ratio'] = 0
      ob['allocationAmount'] = 0
      modalData.checkRyList.push(ob)
    }
  }
  //查所有的员工
  const getAllNickname = async (val: any) => {
    const res = await post({
      url: 'org/hrEmployee/getEmpListByUser',
      data: {},
    })
    if (res.code == 200) {
      modalData.ygNameList = res.data
    } else {
      Message.error({
        content: '查询员工名称失败',
        duration: 5000,
      })
    }
  }
  //获取员工名称
  const getYgName = () => {
    getAllNickname('')
  }
  const handleSearch6 = (value: any) => {
    if (value) {
      loading6.value = true
      getAllNickname(value)
      loading6.value = false
    } else {
      options.value = []
    }
  }
  const visible2 = ref(false)
  const handleCancel2 = () => {
    visible2.value = false
  }
  // 渲染table的数据 打开第二层弹窗
  const cxTable = (type: any) => {
    modalData.ygName = ''
    modalData.ygNameList = []
    modalData.firmId = ''
    modalData.applyBranchId = ''
    visible1.value = true
    modalData.ygNameList = []
    modalData.firmId = null
    modalData.ygType = null
    modalData.ygName = null
    isType = type
  }
  const changeJx = (val: any) => {
    // modalData.adjustment['lastTimeMaintainType'] = val
  }
  //点击单元格删除本行 且删除此数据
  const delRow = (idYg: any) => {
    modalData.checkRyList = modalData.checkRyList.filter(function (o) {
      return o['id'] !== idYg
    })
  }
  //调机比例大于100% 此单元格为0 并提示
  const changeRatio = (ratioNow: any) => {
    var num = 0
    modalData.checkRyList.forEach(function (o: any) {
      num += parseFloat(o['ratio'])
    })
    if (num > 100) {
      setTimeout(() => {
        Message.error({
          content: '此列数据和超过100,请重新输入！',
          duration: 2000,
        })
        ratioNow['ratio'] = 0
      }, 100)
    }
  }
  const needleMpdelList = ref([])
  const needleMpdelClick = (val: any) => {
    post({
      url: '/purchase/MaterialInfo/getFieldValueByZhenYe',
      data: {
        specName: val,
      },
    }).then(({ data }) => {
      needleMpdelList.value = data
    })
  }
  //下拉框得到焦点  织针型号
  const needfocusSel = () => {
    needselCxAll({ specName: '' })
  }
  const formRef1 = ref<any>(null)
  const handleBeforeOk = async () => {
    var num = 0
    modalData.checkRyList.forEach(function (o: any) {
      num += parseFloat(o['ratio'])
    })
    if (
      modalData.adjustment['maintainType'] == '' ||
      modalData.adjustment['maintainType'] == undefined ||
      modalData.adjustment['maintainType'] == null
    ) {
      Message.warning({
        content: '调机类型必填！',
        duration: 2000,
      })
      return
    }
    let upkeepList = []
    const isValid = await formRef1.value.validate()
    if (!isValid) {
      if (
        modalData.adjustment['firm'] == '' ||
        modalData.adjustment['firm'] == undefined ||
        modalData.adjustment['firm'] == null
      ) {
        //如果为空 从机台号下拉框接口那边去取 firmData {}
        modalData.adjustment['firm'] = firmData['firm']
      }
      if (
        modalData.adjustment['firmId'] == '' ||
        modalData.adjustment['firmId'] == undefined ||
        modalData.adjustment['firmId'] == null
      ) {
        //如果为空 从机台号下拉框接口那边去取 firmData {}
        modalData.adjustment['firmId'] = firmData['firmId']
      }
      modalData.btnLoading = true
      const res = await post({
        url: 'planSingle/adjustment/insertDispatch',
        data: {
          adjustment: modalData.adjustment,
          userList: modalData.checkRyList,
          adjustmentStandard: itemsoB,
          upkeepList: [],
        },
      })
      if (res.code === 200) {
        modalData.visible = false
        modalData.btnLoading = false
        selectHandler()
      } else {
        Message.error({
          content: res.message,
          duration: 5000,
        })
      }
      modalData.btnLoading = false
    }
  }
  const handleCancel = () => {
    modalData.visible = false
  }
  //查询按钮
  const selectHandler = async () => {
    if (pageData.tableIndex === '1') {
      await table1Ref.value.setQuery({
        firm: pageData.firm,
        queryStartDate: pageData.queryStartDate,
        queryEndDate: pageData.queryEndDate,
        machineCode: pageData.machineCode,
      })
    } else if (pageData.tableIndex === '2') {
      await table2Ref.value.setQuery({
        firm: pageData.firm,
        machineCode: pageData.machineCode,
        warningDays: pageData.warningDays,
      })
    } else if (pageData.tableIndex === '3') {
      await table3Ref.value.setQuery({
        firm: pageData.firm,
        machineCode: pageData.machineCode,
        adjustmentCode: pageData.adjustmentCode,
      })
    } else {
      await table4Ref.value.setQuery({
        firm: pageData.firm,
        machineCode: pageData.machineCode,
        adjustmentCode: pageData.adjustmentCode,
      })
    }
  }
  //导出按钮
  const handleExport = () => {
    // 获取所有勾选的行数据
    let selectedList: any = []
    const tableRef = eval(`table${pageData.tableIndex}Ref`)
    selectedList = tableRef.value.getSelectedRows()
    if (selectedList.length === 0) {
      Message.error('请先勾选')
      return
    }
    //导出勾选的行为Excel
    const params = {
      fileName:
        pageData.tableIndex === '1'
          ? '洗机监控'
          : pageData.tableIndex === '2'
          ? '洗机预测未处理'
          : pageData.tableIndex === '3'
          ? '洗机预测已处理'
          : '洗机记录',
      onlySelected: true, //只勾选导出的行数据
    }
    tableRef.value.exportSelectedRows(params)
  }
  //新增调机单按钮
  const addTj = () => {
    if (table2Ref.value.getSelectedRows().length == 0) {
      Message.error('请先勾选')
      return
    } else if (table2Ref.value.getSelectedRows().length > 1) {
      Message.error('只能选择一条数据')
      return
    }
    getMaintainTypeList()
    searchMachine(table2Ref.value.getSelectedRows()[0].machineCode, true, false)
    modalData.visible = true
  }
  const changeTabs = (tabKey: any) => {
    pageData.btnList = []
    pageData.tableIndex = tabKey
    if (tabKey === '1') {
      //洗机监控 查询 导出
      if (permissionStore.hasPermisson('xjjk.cx')) {
        pageData.btnList.push('查询')
      }
      if (permissionStore.hasPermisson('xjjk.dc')) {
        pageData.btnList.push('导出')
      }
      nextTick(() => {
        table1Ref.value.setQuery({
          firm: pageData.firm,
          queryStartDate: pageData.queryStartDate,
          queryEndDate: pageData.queryEndDate,
          machineCode: pageData.machineCode,
        })
      })
    } else if (tabKey === '2') {
      //洗机预测未处理 查询  导出  新增调机单
      if (permissionStore.hasPermisson('xjycwcl.cx')) {
        pageData.btnList.push('查询')
      }
      if (permissionStore.hasPermisson('xjycwcl.dc')) {
        pageData.btnList.push('导出')
      }
      if (permissionStore.hasPermisson('xjycwcl.xztjd')) {
        pageData.btnList.push('新增调机单')
      }
      nextTick(() => {
        table2Ref.value.setQuery({
          firm: pageData.firm,
          machineCode: pageData.machineCode,
          warningDays: pageData.warningDays,
        })
      })
    } else if (tabKey === '3') {
      //洗机预测已处理 查询  导出
      if (permissionStore.hasPermisson('xjycycl.cx')) {
        pageData.btnList.push('查询')
      }
      if (permissionStore.hasPermisson('xjycycl.dc')) {
        pageData.btnList.push('导出')
      }
      nextTick(() => {
        table3Ref.value.setQuery({
          firm: pageData.firm,
          machineCode: pageData.machineCode,
          adjustmentCode: pageData.adjustmentCode,
        })
      })
    } else if (tabKey === '4') {
      //洗机记录 查询  导出
      if (permissionStore.hasPermisson('xjjl.cx')) {
        pageData.btnList.push('查询')
      }
      if (permissionStore.hasPermisson('xjjl.dc')) {
        pageData.btnList.push('导出')
      }
      nextTick(() => {
        table4Ref.value.setQuery({
          firm: pageData.firm,
          machineCode: pageData.machineCode,
          adjustmentCode: pageData.adjustmentCode,
        })
      })
    }
  }
  watch(
    () => modalData.adjustment['greyCode'],
    async (newVal) => {
      if (newVal !== '') {
        const res = await post({
          url: 'product/pdGreyInformation/selectpdGreyInformation',
          data: {
            greyCode: newVal,
          },
        })
        if (res.code == 200) {
          modalData.adjustment['widthState'] = res.data[0].drawnNeedleState
          modalData.adjustment['drawnNeedleState'] = res.data[0].drawnNeedleState
        } else {
          ElMessage.error(res.message)
        }
      }
    }
  )
  const goDetail = (data: any) => {
    table5Ref.value.setdataListIterface(data.adjustments)
    visible2.value = true
  }
  emitter.on('detailHandle', (data: any) => {
    goDetail(data)
  })
  const table1Ref = ref<any>(null)
  let configTable1 = {
    url: 'planSingle/washRecord/getPageWashRecordVo', //接口路径
    queryData: {
      firm: pageData.firm,
      queryStartDate: pageData.queryStartDate,
      queryEndDate: pageData.queryEndDate,
      machineCode: pageData.machineCode,
    },
    paginationShow: true, //分页是否显示
    invokeiIterface: false, //是否调用接
    rowMultiSelectWithClick: true, //点击行是否多选
    column: tableColumns,
    fileName: 'WashingMachinePrediction-1',
  }
  const table2Ref = ref<any>(null)
  let configTable2 = {
    url: 'planSingle/washRecord/getPendingDataList', //接口路径
    queryData: {
      firm: pageData.firm,
      machineCode: pageData.machineCode,
      warningDays: pageData.warningDays,
    },
    paginationShow: false, //分页是否显示
    invokeiIterface: false, //是否调用接
    rowMultiSelectWithClick: true, //点击行是否多选
    column: tableColumns2,
    fileName: 'WashingMachinePrediction-2',
  }
  const table3Ref = ref<any>(null)
  let configTable3 = {
    url: 'planSingle/washBandAdjustment/getPageWashBandAdjustmentVo', //接口路径
    queryData: {
      firm: pageData.firm,
      machineCode: pageData.machineCode,
      adjustmentCode: pageData.adjustmentCode,
    },
    paginationShow: true, //分页是否显示
    invokeiIterface: false, //是否调用接
    rowMultiSelectWithClick: true, //点击行是否多选
    column: tableColumns3,
    fileName: 'WashingMachinePrediction-3',
  }
  const table4Ref = ref<any>(null)
  let configTable4 = {
    url: 'planSingle/washRecord/getPageWashRecord', //接口路径
    queryData: {
      firm: pageData.firm,
      machineCode: pageData.machineCode,
      adjustmentCode: pageData.adjustmentCode,
    },
    paginationShow: true, //分页是否显示
    invokeiIterface: false, //是否调用接
    rowMultiSelectWithClick: true, //点击行是否多选
    column: tableColumns4,
    fileName: 'WashingMachinePrediction-4',
  }
  const table5Ref = ref<any>(null)
  let configTable5 = {
    url: '', //接口路径
    queryData: {},
    paginationShow: true, //分页是否显示
    invokeiIterface: false, //是否调用接
    rowMultiSelectWithClick: true, //点击行是否多选
    column: tableColumns5,
    fileName: 'WashingMachinePrediction-5',
  }
</script>

<style scoped>
  .Table {
    border-collapse: collapse;
  }

  .Table td,
  .Table th {
    border: 1px solid #ccc;
    padding: 0 5px 0 5px;
    height: 30px;
  }

  .thClass {
    font-size: 16px;
    font-weight: 600;
  }

  .spanClass {
    display: inline-block;
    width: 120px;
  }

  :deep(.arco-modal-body) {
    height: 100%;
  }
</style>
